<html>
<head><meta charset="utf-8"><title>Derive macro for defining diagnostics · t-compiler/wg-diagnostics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/index.html">t-compiler/wg-diagnostics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Derive.20macro.20for.20defining.20diagnostics.html">Derive macro for defining diagnostics</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205887829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Derive%20macro%20for%20defining%20diagnostics/near/205887829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jumbatm <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Derive.20macro.20for.20defining.20diagnostics.html#205887829">(Aug 04 2020 at 09:35)</a>:</h4>
<p>Hi all! I've just opened <a href="https://github.com/rust-lang/rust/issues/75138">#75138</a>, which will close <a href="https://github.com/rust-lang/rust/issues/61132">#61132</a>. It introduces a derive macro to allow structs to be used to define diagnostics (so, you'll be able to do something like <code>tcx.sess.emit_err(FieldAlreadyDeclared{ .. })</code>). It's still work-in-progress, but it's usable, and I'd appreciate some feedback, suggestions and bikeshedding for what I've currently got. Thanks in advance!</p>



<a name="208377525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Derive%20macro%20for%20defining%20diagnostics/near/208377525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Derive.20macro.20for.20defining.20diagnostics.html#208377525">(Aug 28 2020 at 18:16)</a>:</h4>
<p><span class="user-mention" data-user-id="119031">@Esteban Küber</span> I've reviewed it and think we should merge it, do you also want to take a look over it?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>